//服务层
app.service('itemCatService',function($http){
    //查询实体
    this.findOne=function(id){
        return $http.get('../itemCat/findOne.do?id='+id);
    }

    //读取列表数据绑定到表单中
    this.findAll=function(){
        return $http.get('../itemCat/findAll.do');
    }

	//根据parentId查询分类列表ItemCatList
	this.findItemCatListByParentId = function (parentId,page,rows) {
        return $http.get('../itemCat/findItemCatListByParentId.do?parentId='+parentId+'&page='+page+'&rows='+rows);
    }
    this.findByParentId = function (parentId) {
		return $http.get('../itemCat/findByParentId.do?parentId='+parentId);
    }

});
